﻿//using System.Text;

//namespace WXWorkSvc.Common.TagHelpers;
///// <summary>
///// display优先于for
///// </summary>
//[HtmlTargetElement("weui-preview-item", TagStructure = TagStructure.WithoutEndTag)]
//public class WeuiPreviewItemTagHelper : TagHelper
//{
//    public bool AspIsWarn { get; set; }
//    [HtmlAttributeName("asp-for")]
//    public ModelExpression For { get; set; } = default!;
//    public string? AspDisplayName { get; set; }
//    public string? AspDisplayValue { get; set; }

//    public override void Process(TagHelperContext context, TagHelperOutput output)
//    {
//        output.TagMode = TagMode.StartTagAndEndTag;
//        output.TagName = "div";
//        output.Attributes.AddClass("weui-form-preview__item");
//        var sf = AspIsWarn ? DeskDetailTagHelper.StringFormatWarnWX : DeskDetailTagHelper.StringFormatWX;
//        output.Content.SetHtmlContent(
//            string.Format(sf, string.IsNullOrEmpty(AspDisplayName) ? For.GetDisplayName() : AspDisplayName, string.IsNullOrEmpty(AspDisplayValue) ? For.Model : AspDisplayValue));
//    }
//}
